public class Player implements Observer{
    private String name;
    Player(String name){
        this.name=name;
    }
    @Override
    public String getName() {
        return name;
    }

    @Override
    public void setName(String name) {
        this.name=name;
    }

    @Override
    public void help() {
        System.out.println(name+"去帮忙抵御");
    }

    @Override
    public void beAttacked(AllyControlCenter acc) {
        System.out.println(name+"遭到偷袭攻击");
        acc.notifyObserver(name);
    }
}
